package com.qdc.datacenters.service;

import com.github.pagehelper.PageInfo;
import com.qdc.datacenters.domain.LoginUserInfo;
import com.qdc.datacenters.domain.entity.SysUser;
import com.qdc.datacenters.domain.feature.IUserVo;
import com.qdc.datacenters.domain.query.BaseQuery;
import com.qdc.datacenters.domain.query.user.SysUserAddQuery;
import com.qdc.datacenters.domain.query.user.SysUserQuery;
import com.qdc.datacenters.domain.query.user.SysUserUpdateQuery;
import com.qdc.datacenters.domain.vo.user.SysSimpleUserVo;
import com.qdc.datacenters.domain.vo.user.SysUserVo;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;

import java.util.List;

/**
 * 用户信息表(User)表服务接口
 *
 * @author danmo
 * @since 2024-02-20 18:41:33
 */
public interface ISysUserService extends IBaseService<SysUser>, UserDetailsService {

    SysUser getByUsername(String username);
    SysUser getByCorpUserId(String corpUserId);
    @Override
    LoginUserInfo loadUserByUsername(String username) throws UsernameNotFoundException;

    SysUserVo getByUserId(Long userId);

    PageInfo<SysUserVo> getPageList(SysUserQuery query);

    List<SysUserVo> getList(SysUserQuery query);

    void decorate(IUserVo userVo);
    void decorate(List<? extends IUserVo> userVoList);

    void add(SysUserAddQuery query);

    void edit(SysUserUpdateQuery query);

    void editPassWord(SysUserAddQuery query);

    void delete(SysUserQuery query);

    List<SysSimpleUserVo> getCorpUserList(BaseQuery query);
}

